<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019\6\16 0016
 * Time: 15:46
 */
class SizeDrwaDecorator implements \BigVideo\IMooc\Canvas\DrawDecorator
{
    protected $size;
    public function __construct($size = "14px")
    {
        $this->size = $size;
    }

    public function beforeDraw(){
        echo "<div style='font-size: {$this->size}'>";
    }
    public function afterDraw(){
        echo "</div>";
    }
}